package com.zyuec.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import com.zyuec.springUtil.SystemConfig;

/**
 * 
*    
* 项目名称：springboot-mybatis   
* 类名称：HelloController   
* 类描述：   
* 创建人：ljr 
* 创建时间：2016年12月7日 上午8:58:32   
* 修改人：   
* 修改时间：  
* 修改备注：     
*
 */
@Controller
@EnableAutoConfiguration
@RequestMapping("/zyuec")
public class HelloController {

    private Logger logger = LoggerFactory.getLogger(this.getClass());

    @RequestMapping("/hello/{name}")
    public String hello(@PathVariable("name") String name, Model model) {
    	logger.info("name1："+name+name);
		String  url=SystemConfig.getProperty("dev.datasource.url");
		String  port=SystemConfig.getProperty("server.port");
		logger.info("url："+url+"      port="+port);
        model.addAttribute("name", name);
        return "index/home";
    }
	
    

    @RequestMapping("/hello1/{name}")
    public String hello1(@PathVariable("name") String name, Model model) {
    	logger.info("name1："+name+name);
		String  url=SystemConfig.getProperty("dev.datasource.url");
		String  port=SystemConfig.getProperty("server.port");
		logger.info("url："+url+"      port="+port);
        model.addAttribute("name", name);
        return "index/second";
    }
}
